class Chart {
    constructor(options) {
        this.options = $.extend({}, options);
    }

    loadPlugins(cb) {
        require(['echarts', 'bmap', 'echartsLiquidfill', 'china'], (echarts) => {
            window.echarts = echarts;
            cb()
        })
    }

    init() {
        let myChart = echarts.init(document.getElementById(this.options.id));
        if (this.options.Merge) {
            myChart.setOption(this.options.option, this.options.Merge);
        } else {
            myChart.setOption(this.options.option);
        }
        $('#' + this.options.id).data('echart', myChart);
        windowSesizeArr.push(myChart.resize);
    }
}